<?php
namespace App\Common\Cla\ClaBase\Traits\Common\MagicGather;

use App\Common as com;
use App\Common\Cla\ClaBase\Traits\Common\MagicGather as clac;

/**
 * @property-read $get
 * @author GJJ95
 *
 */
class Main extends com\Cla\ClaBase {
	
	private $getObj = null;
	
	private $setObj = null;
	
	private $callObj = null;
	
	/**
	 * MagicGather所在的this
	 * @var \App\Common\Cla\ClaBase\Traits\Common\MagicGather\MagicClassTemplate
	 */
	private $magicGatherThis = null;
	
	/**
	 * 
	 * @param obj $son_class_this MagicGather所在的this
	 */
	public function __construct( $magic_gather_this ){
		$this->magicGatherThis = $magic_gather_this;
	}
	
	/**
	 * 获取get对象
	 * @return \App\Common\Cla\ClaBase\Traits\Common\MagicGather\Get
	 */
	public function get(){
		if( $this->getObj === null ){
			$this->getObj = (new clac\Get( $this->magicGatherThis ));
		}
		//
		return $this->getObj;
	}
	
	/**
	 * 获取set对象
	 * @return \App\Common\Cla\ClaBase\Traits\Common\MagicGather\Set
	 */
	public function set(){
		if( $this->setObj === null ){
			$this->setObj = (new clac\Set( $this->magicGatherThis ));
		}
		//
		return $this->setObj;
	}
	
	/**
	 * 获取call对象
	 * @return clac\Call
	 */
	public function call(){
		if( $this->callObj === null ){
			$this->callObj= (new clac\Call( $this->magicGatherThis ));
		}
		//
		return $this->callObj;
	}
	
}
